\(\int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx\) [38]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 28 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {b \sec ^2(c+d x)}{2 d}+\frac {a \tan (c+d x)}{d} \]

[Out]

1/2*b*sec(d*x+c)^2/d+a*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3169, 3852, 8, 2686, 30} \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {a \tan (c+d x)}{d}+\frac {b \sec ^2(c+d x)}{2 d} \]

[In]

Int[Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

(b*Sec[c + d*x]^2)/(2*d) + (a*Tan[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3169

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (a \sec ^2(c+d x)+b \sec ^2(c+d x) \tan (c+d x)\right ) \, dx \\ & = a \int \sec ^2(c+d x) \, dx+b \int \sec ^2(c+d x) \tan (c+d x) \, dx \\ & = -\frac {a \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}+\frac {b \text {Subst}(\int x \, dx,x,\sec (c+d x))}{d} \\ & = \frac {b \sec ^2(c+d x)}{2 d}+\frac {a \tan (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {b \sec ^2(c+d x)}{2 d}+\frac {a \tan (c+d x)}{d} \]

[In]

Integrate[Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

(b*Sec[c + d*x]^2)/(2*d) + (a*Tan[c + d*x])/d

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.89

method result size
derivativedivides \(\frac {a \tan \left (d x +c \right )+\frac {b}{2 \cos \left (d x +c \right )^{2}}}{d}\) \(25\)
default \(\frac {a \tan \left (d x +c \right )+\frac {b}{2 \cos \left (d x +c \right )^{2}}}{d}\) \(25\)
parts \(\frac {b \sec \left (d x +c \right )^{2}}{2 d}+\frac {a \tan \left (d x +c \right )}{d}\) \(27\)
risch \(\frac {2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 i a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}\) \(48\)
parallelrisch \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}\) \(70\)
norman \(\frac {\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}+\frac {2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}+\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\) \(99\)

[In]

int(sec(d*x+c)^3*(cos(d*x+c)*a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*tan(d*x+c)+1/2*b/cos(d*x+c)^2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b}{2 \, d \cos \left (d x + c\right )^{2}} \]

[In]

integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(2*a*cos(d*x + c)*sin(d*x + c) + b)/(d*cos(d*x + c)^2)

Sympy [F]

\[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}\, dx \]

[In]

integrate(sec(d*x+c)**3*(a*cos(d*x+c)+b*sin(d*x+c)),x)

[Out]

Integral((a*cos(c + d*x) + b*sin(c + d*x))*sec(c + d*x)**3, x)

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {2 \, a \tan \left (d x + c\right ) - \frac {b}{\sin \left (d x + c\right )^{2} - 1}}{2 \, d} \]

[In]

integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(2*a*tan(d*x + c) - b/(sin(d*x + c)^2 - 1))/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.89 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {b \tan \left (d x + c\right )^{2} + 2 \, a \tan \left (d x + c\right )}{2 \, d} \]

[In]

integrate(sec(d*x+c)^3*(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/2*(b*tan(d*x + c)^2 + 2*a*tan(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 20.95 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (2\,a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{2\,d} \]

[In]

int((a*cos(c + d*x) + b*sin(c + d*x))/cos(c + d*x)^3,x)

[Out]

(tan(c + d*x)*(2*a + b*tan(c + d*x)))/(2*d)